package com.david.IfaceAutoTest.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import java.time.LocalDateTime;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import java.io.Serializable;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * <p>
 * 
 * </p>
 *
 * @author david
 * @since 2021-12-24
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("interface")
@ApiModel(value="Interface对象", description="")
public class Interface extends Model<Interface> {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "自增id")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty(value = "接口名")
    private String interfaceName;

    @ApiModelProperty(value = "接口描述")
    private String description;

    @ApiModelProperty(value = "模块id")
    private Integer modelId;

    @ApiModelProperty(value = "接口方法类型get,post,put ,del")
    private String interfaceMethod;

    @ApiModelProperty(value = "接口http类型:http,https")
    private String interfaceProtocol;

    @ApiModelProperty(value = "接口host、端口")
    private String host;

    @ApiModelProperty(value = "接口路径")
    private String interfacePath;

    private LocalDateTime createTime;

    private LocalDateTime updateTime;

    @ApiModelProperty(value = "是否删除，0未删")
    @TableLogic
    private Integer isDel;

    @ApiModelProperty(value = "接口地址")
    private String interfaceRaw;


    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
